﻿using System.Web.Script.Serialization;

namespace Mvc4Demo.Extensions
{
    public static class JsonExtensions
    {
        public static string ToJsonData(this object data)
        {
            var serializer = new JavaScriptSerializer();
            return  serializer.Serialize(data); 
        }
    }
}